import request from '../request'

const Api = {
  page: '/api/adminfnc/fncInfo/page',
  save: '/api/adminfnc/fncInfo/save',
  remove: '/api/adminfnc/fncInfo/remove',
  detail: '/api/adminfnc/fncInfo/selectById',
  update: '/api/adminfnc/fncInfo/update',
  template: '/api/adminta/tA/down/template',
  imports: '/api/adminta/tA/import',
}

export const remove = params => {
  return request.request({
    url: Api.remove,
    params,
    method: 'DELETE'
  })
}
// page分页
export const page = params => {
  return request.request({
    url: Api.page,
    params,
    method: 'GET'
  })
}
// 获取学校分页
export const schoolPage = params => {
  return request.request({
    url: Api.schoolPage,
    params,
    method: 'GET'
  })
}

/** 基本信息 */
export const save = data => {
  return request.request({
    url: Api.save,
    data,
    method: 'POST'
  })
}
/** 基本信息 */
export const update = data => {
  return request.request({
    url: Api.update,
    data,
    method: 'PUT'
  })
}
/** 基本信息 */
export const detail = params => {
  return request.request({
    url: Api.detail,
    params,
    method: 'GET'
  })
}
/** 文件上传 */
export const upload = data => {
  return request.request({
    url: Api.upload,
    data,
    method: 'post'
  })
}
/** 文件导入 */
export const imports = data => {
  return request.request({
    url: Api.imports,
    data,
    method: 'post'
  })
}

/** 数据字典列表 */
export const dictionary = params => {
  return request.request({
    url: Api.dictionary,
    params,
    method: 'GET'
  })
}
export const templateUrl = Api.template